package com.bby.common.model;

/**
 * 文件权限内容
 */
public class PermissionDetail {
    public boolean open;
    public boolean create;
    public boolean delete;
    public boolean edit;
    public boolean download;
    public boolean copy;
    public boolean move;
    public boolean view;
    public boolean needPw;

    public void setOpen(boolean open) {
        this.open = open;
    }

    public void setCreate(boolean create) {
        this.create = create;
    }

    public void setDelete(boolean delete) {
        this.delete = delete;
    }

    public void setRename(boolean edit) {
        this.edit = edit;
    }

    public void setDownload(boolean download) {
        this.download = download;
    }

    public void setCopy(boolean copy) {
        this.copy = copy;
    }

    public void setView(boolean view) {
        this.view = view;
    }

    public void setNeedPw(boolean needPw) {
        this.needPw = needPw;
    }

    public boolean canOpen() {
        return open&&open&&open;
    }

    public boolean canCreate() {
        return open&&create;
    }

    public boolean canDelete() {
        return open&&delete;
    }

    public boolean canRename() {
        return open&&edit;
    }
    public boolean canMove() {
        return open&&move;
    }

    public boolean canDownload() {
        return open&&download;
    }

    public boolean canCopy() {
        return open&&copy;
    }

    public boolean canView() {
        return open&&view;
    }

    public boolean canNeedPw() {
        return open&&needPw;
    }
}
